<?php require('connections/con_gl.php'); ?>
<?php
cekAkses($_SESSION[akses],"MS-8-1");
mysql_select_db($database_con_gl, $con_gl);
$query_klas = "SELECT id, jeniskendaraan FROM gl_jeniskendaraan ORDER BY jeniskendaraan ASC";
$klas = mysql_query($query_klas, $con_gl) or die(mysql_error());
$row_klas = mysql_fetch_assoc($klas);
$totalRows_klas = mysql_num_rows($klas);

mysql_select_db($database_con_gl, $con_gl);
$query_klas1 = "SELECT id, merk FROM gl_merkkendaraan ORDER BY merk ASC";
$klas1 = mysql_query($query_klas1, $con_gl) or die(mysql_error());
$row_klas1 = mysql_fetch_assoc($klas1);
$totalRows_klas1 = mysql_num_rows($klas1);

mysql_select_db($database_con_gl, $con_gl);
$query_klas2 = "SELECT id, tipekendaraan FROM gl_tipekendaraan ORDER BY tipekendaraan ASC";
$klas2 = mysql_query($query_klas2, $con_gl) or die(mysql_error());
$row_klas2 = mysql_fetch_assoc($klas2);
$totalRows_klas2 = mysql_num_rows($klas2);

mysql_select_db($database_con_gl, $con_gl);
$query_klas3 = "SELECT id, area FROM gl_area ORDER BY area ASC";
$klas3 = mysql_query($query_klas3, $con_gl) or die(mysql_error());
$row_klas3 = mysql_fetch_assoc($klas3);
$totalRows_klas3 = mysql_num_rows($klas3);

mysql_select_db($database_con_gl, $con_gl);
$query_klas4 = "SELECT id, gudang FROM gl_gudang ORDER BY gudang ASC";
$klas4 = mysql_query($query_klas4, $con_gl) or die(mysql_error());
$row_klas4 = mysql_fetch_assoc($klas4);
$totalRows_klas4 = mysql_num_rows($klas4);

mysql_select_db($database_con_gl, $con_gl);
$query_klas5 = "SELECT id, status FROM gl_statuskendaraan ORDER BY status ASC";
$klas5 = mysql_query($query_klas5, $con_gl) or die(mysql_error());
$row_klas5 = mysql_fetch_assoc($klas5);
$totalRows_klas5 = mysql_num_rows($klas5);

mysql_select_db($database_con_gl, $con_gl);
$query_klas6 = "SELECT id, jenis FROM gl_jenisasuransi ORDER BY jenis ASC";
$klas6 = mysql_query($query_klas6, $con_gl) or die(mysql_error());
$row_klas6 = mysql_fetch_assoc($klas6);
$totalRows_klas6 = mysql_num_rows($klas6);

mysql_select_db($database_con_gl, $con_gl);
$query_klas7 = "SELECT id, nama FROM gl_kontak WHERE type='Asuransi' ORDER BY nama ASC";
$klas7 = mysql_query($query_klas7, $con_gl) or die(mysql_error());
$row_klas7 = mysql_fetch_assoc($klas7);
$totalRows_klas7 = mysql_num_rows($klas7);

mysql_select_db($database_con_gl, $con_gl);
$query_klas8 = "SELECT id, nama FROM gl_kontak WHERE type='Karyawan' AND tkaryawan='Driver' ORDER BY nama ASC";
$klas8 = mysql_query($query_klas8, $con_gl) or die(mysql_error());
$row_klas8 = mysql_fetch_assoc($klas8);
$totalRows_klas8 = mysql_num_rows($klas8);

mysql_select_db($database_con_gl, $con_gl);
$query_klas9 = "SELECT id, nama FROM gl_kontak WHERE type='Customer' ORDER BY nama ASC";
$klas9 = mysql_query($query_klas9, $con_gl) or die(mysql_error());
$row_klas9 = mysql_fetch_assoc($klas9);
$totalRows_klas9 = mysql_num_rows($klas9);

mysql_select_db($database_con_gl, $con_gl);
$query_klas10 = "SELECT id, jenisbbm FROM gl_jenisbbm ORDER BY jenisbbm ASC";
$klas10 = mysql_query($query_klas10, $con_gl) or die(mysql_error());
$row_klas10 = mysql_fetch_assoc($klas10);
$totalRows_klas10 = mysql_num_rows($klas10);

?>

<link href="ccss/ui.datepicker.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/ui.datepicker.js"></script>
<script type="text/javascript">
<!--
$(function()
      {
        $('.calendar').datepicker({
            appendText : "",
            dateFormat : 'yy/mm/dd'
          });
      });
	  
</script>
<script type="text/javascript" src="js/ajax_data.js"></script>
<script type="text/javascript">
// --- cek status kir
function checkstatuskir(val) {
	if(val=='NONE') {
		document.getElementById('nokir').value=null;	
		document.getElementById('nokir').disabled='disabled';		
		document.getElementById('jthtempokir').value=null;	
		document.getElementById('jthtempokir').disabled='disabled';		
	}else{
		document.getElementById('jenis').disabled='';	
		document.getElementById('nokir').disabled='';	
		document.getElementById('jthtempokir').disabled='';	
	}
}
// ---
// --- cek status kir
function checkstatusasuransi(val) {
	if(val=='NONE') {
		document.getElementById('jenis').value=null;	
		document.getElementById('jenis').disabled='disabled';		
		document.getElementById('namaperusahaan').value=null;	
		document.getElementById('namaperusahaan').disabled='disabled';		
		document.getElementById('nopolis').value=null;	
		document.getElementById('nopolis').disabled='disabled';		
		document.getElementById('jthtempopolis').value=null;	
		document.getElementById('jthtempopolis').disabled='disabled';		
	}else{
		document.getElementById('jenis').disabled='';	
		document.getElementById('namaperusahaan').disabled='';	
		document.getElementById('nopolis').disabled='';	
		document.getElementById('jthtempopolis').disabled='';	
	}
}
// ---

$(document).ready(function() {

	$().ajaxStart(function() {
		$('#loading').show();
		$('#result').hide();
	}).ajaxStop(function() {
		$('#loading').hide();
		$('#result').fadeIn('slow');
	});

	$('#add').submit(function() {
		$.ajax({
			type: 'POST',
			url: $(this).attr('action'),
			data: $(this).serialize(),
			success: function(data) {
				$('#result').html(data);
			}
		})
		return false;
	});
  $('#result').click(function(){
  $(this).hide();
  });
})
</script>
<script>
function sendRespondArea() {
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('divJenis');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
		if (ajaxRequest.readyState == 3) {
			var ajaxDisplay = document.getElementById('divJenis');
			ajaxDisplay.innerHTML = "<img src='images/ajax-loader.gif' />";
		}
	}
	ajaxRequest.open("GET", "include/send_respondarea.php", true);
	ajaxRequest.send(null);	
}
</script>
<script>
function sendRespondCabang() {
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('divMerk');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
		if (ajaxRequest.readyState == 3) {
			var ajaxDisplay = document.getElementById('divMerk');
			ajaxDisplay.innerHTML = "<img src='images/ajax-loader.gif' />";
		}
	}
	ajaxRequest.open("GET", "include/send_respondarea.php", true);
	ajaxRequest.send(null);	
}
</script>
<script>
function sendRespondArea() {
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4){
			var ajaxDisplay = document.getElementById('divJenis');
			ajaxDisplay.innerHTML = ajaxRequest.responseText;
		}
		if (ajaxRequest.readyState == 3) {
			var ajaxDisplay = document.getElementById('divJenis');
			ajaxDisplay.innerHTML = "<img src='images/ajax-loader.gif' />";
		}
	}
	ajaxRequest.open("GET", "include/send_respondarea.php", true);
	ajaxRequest.send(null);	
}
</script>

<style type="text/css">
<!--
.ed {border-style:solid;
border-width:thin;
border-color:#00CCFF;
padding:5px;
margin-bottom: 4px;
}
-->
</style>
<div id="loading" style="display:none;"><img src="images/loading.gif" alt="loading..." /></div>
<div id="result" style="display:none;"></div>
<h1>Tambah Data Stok Kendaraan</h1>
<form action="proses/masterkendaraan.php?act=add" method="POST" name="add" id="add" >
  <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0">
    <tr>
      <td colspan="2" align="right" bgcolor="#DDDDDD"><div align="left">
        <div align="left">Data Umum Kendaraan </div>
      </div></td>
      <td align="right">&nbsp;</td>
      <td colspan="2" bgcolor="#DDDDDD">Data Surat-Surat Kendaraan </td>
      <td>&nbsp;</td>
      <td colspan="2" valign="top" bgcolor="#DDDDDD">Data Operasional </td>
    </tr>
    <tr>
      <td width="12%" align="right" valign="top" bgcolor="#FFFFFF">Kode Asset  : </td>
      <td width="21%" valign="top" bgcolor="#FFFFFF"><label>
        <input name="kodeasset" type="text" id="kodeasset" size="30" maxlength="100" />
      </label></td>
      <td width="1%" bgcolor="#FFFFFF">&nbsp;</td>
      <td width="13%" bgcolor="#EEEEEE"><div align="left">STNK </div></td>
      <td width="21%" bgcolor="#FFFFFF">&nbsp;</td>
      <td width="1%" bgcolor="#FFFFFF">&nbsp;</td>
      <td width="13%" valign="top" bgcolor="#FFFFFF"><div align="right">Nama Pengemudi : </div></td>
      <td width="18%" valign="top" bgcolor="#FFFFFF"><select name="namapengemudi" id="namapengemudi" style="width:180px;">
          <option value="NULL" >Pilih Pengemudi</option>
          <?php
do {  
?>
          <option value="<?php echo $row_klas8['id']?>"><?php echo $row_klas8['nama']?></option>
          <?php
} while ($row_klas8 = mysql_fetch_assoc($klas8));
  $rows = mysql_num_rows($klas8);
  if($rows > 0) {
      mysql_data_seek($klas8, 0);
	  $row_klas8 = mysql_fetch_assoc($klas8);
  }
?>
      </select></td>
    </tr>
    <tr valign="top">
      <td width="12%" align="right" bgcolor="#FFFFFF">No.Polisi*  : </td>
      <td width="21%" bgcolor="#FFFFFF"><label>
        <input name="nopolisi" type="text" id="nopolisi" size="30" maxlength="100" />
      </label></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Atas Nama : </div></td>
      <td bgcolor="#FFFFFF"><input name="namapemilik" type="text" id="namapemilik" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Nama Pelanggan : </div></td>
      <td bgcolor="#FFFFFF"><select name="namacustomer" id="namacustomer" style="width:180px;">
          <option value="NULL" >Pilih Pelanggan </option>
          <?php
do {  
?>
          <option value="<?php echo $row_klas9['id']?>"><?php echo $row_klas9['nama']?></option>
          <?php
} while ($row_klas9 = mysql_fetch_assoc($klas9));
  $rows = mysql_num_rows($klas9);
  if($rows > 0) {
      mysql_data_seek($klas9, 0);
	  $row_klas9 = mysql_fetch_assoc($klas9);
  }
?>
      </select></td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Jenis Kendaraan* : </td>
      <td bgcolor="#FFFFFF"><label id='divJenis'><select name="jeniskendaraan" id="jeniskendaraan" style="width:180px;">
          <option value="" >Pilih Jenis Kendaraan</option>
          <?php
do {  
?>
          <option value="<?php echo $row_klas['id']?>"><?php echo $row_klas['jeniskendaraan']?></option>
          <?php
} while ($row_klas = mysql_fetch_assoc($klas));
  $rows = mysql_num_rows($klas);
  if($rows > 0) {
      mysql_data_seek($klas, 0);
	  $row_klas = mysql_fetch_assoc($klas);
  }
?>
      </select></label>
        <?php if(strstr($_SESSION['akses'],"PD-7-1")) { ?>
        <a href="index.php?component=jeniskendaraan&amp;task=add&amp;open=window" onclick="NewWindow(this.href,'name','825','450','yes');return false"><img src="images/add_.png" hspace="2" border="0" /></a>
        <?php } ?></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">No. STNK* : </div></td>
      <td bgcolor="#FFFFFF"><input name="nostnk" type="text" id="nostnk" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Jatuh Tempo Sewa : </div></td>
      <td bgcolor="#FFFFFF"><input name="jthtemposea" type="text" id="jthtemposewa" value="<?php echo $_GET[jthtemposewa];?>" size="15" maxlength="15" class="calendar"/></td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Merk Kendarran* : </td>
      <td bgcolor="#FFFFFF"><label id='divMerk'><select name="merk" id="merk" style="width:180px;">
          <option value="" >Pilih Merk Kendaraan</option>
          <?php
do {  
?>
          <option value="<?php echo $row_klas1['id']?>"><?php echo $row_klas1['merk']?></option>
          <?php
} while ($row_klas1 = mysql_fetch_assoc($klas1));
  $rows = mysql_num_rows($klas1);
  if($rows > 0) {
      mysql_data_seek($klas1, 0);
	  $row_klas1 = mysql_fetch_assoc($klas1);
  }
?>
      </select></label>
        <?php if(strstr($_SESSION['akses'],"PD-7-1")) { ?>
        <a href="index.php?component=merkkendaraan&amp;task=add&amp;open=window" onclick="NewWindow(this.href,'name','825','450','yes');return false"><img src="images/add_.png" hspace="2" border="0" /></a>
        <?php } ?></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Jatuh Tempo STNK* : </div></td>
      <td bgcolor="#FFFFFF"><input name="jthtempostnk" type="text" id="jthtempostnk" value="<?php echo $_GET[jthtempostnk];?>" size="15" maxlength="15" class="calendar"/></td>

      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">KM Awal  : </div></td>
      <td bgcolor="#FFFFFF"><input name="kmawal" type="text" id="kmawal" size="6" maxlength="100" />
        KM Akhir :
        <input name="kmakhir" type="text" id="kmakhir" size="6" maxlength="100" /></td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Tipe Kendaraan* : </td>
      <td bgcolor="#FFFFFF"><label id='divTipe'><select name="tipekendaraan" id="tipekendaraan" style="width:180px;">
          <option value="" >Pilih Tipe Kendaraan</option>
          <?php
do {  
?>
          <option value="<?php echo $row_klas2['id']?>"><?php echo $row_klas2['tipekendaraan']?></option>
          <?php
} while ($row_klas2 = mysql_fetch_assoc($klas2));
  $rows = mysql_num_rows($klas2);
  if($rows > 0) {
      mysql_data_seek($klas2, 0);
	  $row_klas2 = mysql_fetch_assoc($klas2);
  }
?>
      </select></label>
        <?php if(strstr($_SESSION['akses'],"PD-7-1")) { ?>
        <a href="index.php?component=tipekendaraan&amp;task=add&amp;open=window" onclick="NewWindow(this.href,'name','825','450','yes');return false"><img src="images/add_.png" hspace="2" border="0" /></a>
        <?php } ?></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">No BPKB* : </div></td>
      <td bgcolor="#FFFFFF"><input name="nobpkb" type="text" id="nobpkb" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td colspan="2" bgcolor="#DDDDDD">Kelengkapan Kendaraan </td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Tahun Pembuatan : </td>
      <td bgcolor="#FFFFFF"><input name="tahun" type="text" id="tahun" size="10" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">No. Mesin* : </div></td>
      <td bgcolor="#FFFFFF"><input name="nomesin" type="text" id="nomesin" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><input name="ban" type="checkbox" id="ban" value="ok" />
        Ban Cadangan </td>
      <td bgcolor="#FFFFFF"><input name="radiotape" type="checkbox" id="radiotape" value="ok" />
        Radio Tape </td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Warna Utama : </td>
      <td bgcolor="#FFFFFF"><input name="warnautama" type="text" id="warnautama" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">No. Rangka* : </div></td>
      <td bgcolor="#FFFFFF"><input name="norangka" type="text" id="norangka" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><input name="dongkrak" type="checkbox" id="dongkrak" value="ok" />
        Dongkrak</td>
      <td bgcolor="#FFFFFF"><input name="karpet" type="checkbox" id="karpet" value="ok" />
        Karpet Lantai </td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Warna Kombinasi : </td>
      <td bgcolor="#FFFFFF"><input name="warnakomb" type="text" id="warnakomb" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#EEEEEE">Asuransi Kendaraan </td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><input name="segitiga" type="checkbox" id="segitiga" value="ok" />
        Segitiga Pengaman </td>
      <td bgcolor="#FFFFFF"><input name="doproda" type="checkbox" id="doproda" value="ok" />
        Dop Roda </td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Jenis BBM : </td>
      <td bgcolor="#FFFFFF"><select name="jenisbbm" id="jenisbbm" style="width:180px;">
          <?php
do {  
?>
          <option value="<?php echo $row_klas10['id']?>"><?php echo $row_klas10['jenisbbm']?></option>
          <?php
} while ($row_klas10 = mysql_fetch_assoc($klas10));
  $rows = mysql_num_rows($klas10);
  if($rows > 0) {
      mysql_data_seek($klas10, 0);
	  $row_klas10 = mysql_fetch_assoc($klas10);
  }
?>
      </select></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Status Asuransi : </div></td>
      <td bgcolor="#FFFFFF"><select name="statusasuransi" id="statusasuransi" onchange="checkstatusasuransi(this.value);" style="width:180px;">
        <option value="NONE">NONE</option>
        <option value="ADA">ADA</option>
      </select></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><input name="kunciroda" type="checkbox" id="kunciroda" value="ok" />
        Kunci Roda </td>
      <td bgcolor="#FFFFFF"><input name="pematikapi" type="checkbox" id="pematikapi" value="ok" />
        Pematik Api </td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Est. Rasio BBM : </td>
      <td bgcolor="#FFFFFF"><input name="rasio" type="text" id="rasio" size="10" maxlength="100" />
        KM/Liter</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Jenis Polis : </div></td>
      <td bgcolor="#FFFFFF"><label id='divPolis'><select name="jenis" id="jenis" style="width:180px;">
      <option value=NULL >Pilih Jenis Polis</option>
        <?php
do {  
?>
        <option value="<?php echo $row_klas6['id']?>"><?php echo $row_klas6['jenis']?></option>
        <?php
} while ($row_klas6 = mysql_fetch_assoc($klas6));
  $rows = mysql_num_rows($klas6);
  if($rows > 0) {
      mysql_data_seek($klas6, 0);
	  $row_klas6 = mysql_fetch_assoc($klas6);
  }
?>
      </select></label>
        <?php if(strstr($_SESSION['akses'],"PD-7-1")) { ?>
        <a href="index.php?component=jenisasuransi&amp;task=add&amp;open=window" onclick="NewWindow(this.href,'name','825','450','yes');return false"><img src="images/add_.png" hspace="2" border="0" /></a>
        <?php } ?></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Jumlah seat : </td>
      <td bgcolor="#FFFFFF"><input name="jmlseat" type="text" id="jmlseat" size="10" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Perusahaan Asuransi : </div></td>
      <td bgcolor="#FFFFFF"> <label id='divKontak'><select name="namaperusahaan" id="namaperusahaan" style="width:180px;">
      <option value=NULL >Pilih Perusahaan Asuransi</option>
          <?php
do {  
?>
          <option value="<?php echo $row_klas7['id']?>"><?php echo $row_klas7['nama']?></option>
          <?php
} while ($row_klas7 = mysql_fetch_assoc($klas7));
  $rows = mysql_num_rows($klas7);
  if($rows > 0) {
      mysql_data_seek($klas7, 0);
	  $row_klas7 = mysql_fetch_assoc($klas7);
  }
?>
      </select></label>
        <?php if(strstr($_SESSION['akses'],"PD-7-1")) { ?>
        <a href="index.php?component=asuransirekanan&amp;task=add&amp;open=window" onclick="NewWindow(this.href,'name','825','450','yes');return false"><img src="images/add_.png" hspace="2" border="0" /></a>
        <?php } ?></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr valign="top">
      <td colspan="2" bgcolor="#DDDDDD">Status Kendaraan </td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">No.Polis : </div></td>
      <td bgcolor="#FFFFFF"><input name="nopolis" type="text" id="nopolis" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Area* : </td>
      <td width="21%" bgcolor="#FFFFFF"><label id='divJenis'><select name="area" id="area" onchange="getListCabang();" style="width:180px;">
          <option value="" >Pilih Kota / Area </option>
          <?php
do {  
?>
          <option value="<?php echo $row_klas3['id']?>"><?php echo $row_klas3['area']?></option>
          <?php
		
} while ($row_klas3 = mysql_fetch_assoc($klas3));
  $rows = mysql_num_rows($klas3);
  if($rows > 0) {
      mysql_data_seek($klas3, 0);
	  $row_klas3 = mysql_fetch_assoc($klas3);
  }
?>
      </select></label>
        <?php if(strstr($_SESSION['akses'],"PD-6-1")) { ?>
        <a href="index.php?component=area&amp;task=add&amp;open=window" onclick="NewWindow(this.href,'name','825','450','yes');return false"><img src="images/add_.png" hspace="2" border="0" /></a>
        <?php } ?></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF"><div align="right">Jatuh Tempo Polis: </div></td>
      <td bgcolor="#FFFFFF"><input name="jthtempopolis" type="text" id="jatuhtempopolis" value="<?php echo $_GET[jthtempopolis];?>" size="15" maxlength="15" class="calendar"/></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr valign="top">
      <td align="right" bgcolor="#FFFFFF">Cabang* : </td>
      <td bgcolor="#FFFFFF"><label id="divListCabang">
        <select name="cabang" id="cabang" style="width:180px;">
          <option value="" >Pilih Kantor / Cabang </option>
        </select>
        <?php if(strstr($_SESSION['akses'],"PD-7-1")) { ?>
        <a href="index.php?component=gudang&amp;task=add&amp;open=window" onclick="NewWindow(this.href,'name','825','450','yes');return false"><img src="images/add_.png" hspace="2" border="0" /></a>
        <?php } ?>
      </label></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#EEEEEE">KIR</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" valign="top" bgcolor="#FFFFFF">Status Kendaraan : </td>
      <td valign="top" bgcolor="#FFFFFF"><label id='divStatus'><select name="status" id="status" style="width:180px;">
          <option value="NULL" >Pilih Status Kendaraan</option>
          <?php
do {  
?>
          <option value="<?php echo $row_klas5['id']?>"><?php echo $row_klas5['status']?></option>
          <?php
} while ($row_klas5 = mysql_fetch_assoc($klas5));
  $rows = mysql_num_rows($klas5);
  if($rows > 0) {
      mysql_data_seek($klas5, 0);
	  $row_klas5 = mysql_fetch_assoc($klas5);
  }
?>
      </select></label>
        <?php if(strstr($_SESSION['akses'],"PD-7-1")) { ?>
        <a href="index.php?component=status&amp;task=add&amp;open=window" onclick="NewWindow(this.href,'name','825','450','yes');return false"><img src="images/add_.png" hspace="2" border="0" /></a>
        <?php } ?></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td valign="top" bgcolor="#FFFFFF"><div align="right">Status KIR: </div></td>
      <td valign="top" bgcolor="#FFFFFF"><select name="statuskir" id="statuskir" onchange="checkstatuskir(this.value);" style="width:180px;">
          <option value="NONE">NONE</option>
          <option value="ADA">ADA</option>
      </select></td>
      <td valign="top" bgcolor="#FFFFFF">&nbsp;</td>
      <td valign="top" bgcolor="#FFFFFF">&nbsp;</td>
      <td valign="top" bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    
    <tr>
      <td valign="top"><div align="right">Tersedia</div></td>
      <td valign="top"><input name="ada" type="checkbox" id="ada" value="1" checked="checked" />
          <small>Check jika tersedia</small> </td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td valign="top" bgcolor="#FFFFFF"><div align="right">No. KIR :</div></td>
      <td valign="top" bgcolor="#FFFFFF"><input name="nokir" type="text" id="nokir" size="30" maxlength="100" /></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
      <td valign="top" bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td valign="top" bgcolor="#FFFFFF"><div align="right">Jatuh Tempo KIR: </div></td>
      <td valign="top" bgcolor="#FFFFFF"><input name="jthtempokir" type="text" id="jthtempokir" value="<?php echo $_GET[jthtempokir];?>" size="15" maxlength="15" class="calendar"/></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr>
      <td align="left" bgcolor="#FFFFFF"><em>*Harus diisi</em></td>
      <td bgcolor="#FFFFFF"><label>
        <input name="Save" type="submit" id="Save" value="Simpan" />
        </label>
          <label>
          <input type="button" name="Button" value="Batal" onClick="javascript:history.go(-1);">
        </label></td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
      <td bgcolor="#FFFFFF">&nbsp;</td>
    </tr>
  </table>
</form>
